<!--
 * @Author: xuwejie 1529315455@qq.com
 * @Date: 2023-08-28 14:39:13
 * @LastEditors: xuwejie 1529315455@qq.com
 * @LastEditTime: 2023-09-27 14:05:42
 * @FilePath: \v9\src\components\Hamburger\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div style="" @click="toggleClick">
    <svg
      :class="{ 'is-active': isActive }"
      class="hamburger"
      viewBox="0 0 1024 1024"
      xmlns="http://www.w3.org/2000/svg"
      width="64"
      height="64"
    >
      <path
        d="M567.528214 501.958623l-247.526961-247.526962 82.505646-82.50564701 330.04263 330.03260901-330.04263 330.04262999-82.505646-82.51566799 247.526961-247.526962z"
      />
    </svg>
  </div>
</template>

<script>
export default {
  name: "Hamburger",
  props: {
    isActive: {
      type: Boolean,
      default: false,
    },
  },
  methods: {
    toggleClick() {
      this.$emit("toggleClick");
    },
  },
};
</script>

<style scoped lang="scss">
.hamburger {
  display: inline-block;
  vertical-align: middle;
  width: 25px;
  height: 25px;
  transform: rotate(0deg);
  font-size: 24px;
  fill: #fff;
}

.hamburger.is-active {
  transform: rotate(-180deg);
}
</style>
